﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
using System.IO;

namespace UnitLite.Util
{
    public class ProjectSettings
    {
        public static string InstallPath
        {
            get
            {
                RegistryKey UnitLiteKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\UnitLite");
                return UnitLiteKey.GetValue("Location").ToString();
            }
        }

        public static string AppFullName
        {
            get
            {
                return System.IO.Path.Combine(ProjectSettings.InstallPath, "App.config");
            }
        }

        public static string LibraryName
        {
            get
            {
                return ConfigurationSettings.AppSettings["Library"];
            }
        }

        public static string LibraryPath
        {
            get
            {
                return Path.Combine(FolderPath, LibraryName);
            }
        }

        public static string ProjectPath
        {
            get
            {
                return Path.Combine(FolderPath, ConfigurationSettings.AppSettings["Project"]);
            }
        }

        public static string FilePath
        {
            get
            {
                return Path.Combine(FolderPath, ConfigurationSettings.AppSettings["File"]);
            }
        }

        public static string FolderName
        {
            get
            {
                return ConfigurationSettings.AppSettings["Folder"];
            }
        }

        public static string FolderPath
        {
            get
            {
                return Path.Combine(ProjectSettings.InstallPath, FolderName);
            }
        }

        public static string Suffix
        {
            get
            {
                return ConfigurationSettings.AppSettings["Suffix"];
            }
        }
    }
}
